package com.itany.service.impl;

import com.itany.dao.DeptDao;
import com.itany.jdbc.factory.ObjectFactory;
import com.itany.pojo.Dept;
import com.itany.service.DeptService;

import java.util.List;

/**
 * @author 陈华旺
 * @version 1.0
 * @date 2023年11月23日 11:39
 * @Description TODO
 */
public class DeptServiceImpl implements DeptService {
    private DeptDao deptDao = ObjectFactory.getObj("DeptDao");
    @Override
    public List<Dept> findAllDetp() {
        List<Dept> depts = deptDao.selectDeptAll();
        return depts;
    }

    @Override
    public Dept findDetpDetail(String deptno) {
        Dept dept = deptDao.selectDeptByNo(deptno);
        return dept;
    }
}






